<?php
/**
 * Verzorgt de connectie met de database
 * @author Sam Verschueren
 */
class Connectie {
	
	const DATABASE_NAME = "aps";
	const DATABASE_HOST = "localhost";
	const DATABASE_USER = "root";
	const DATABASE_PASSWORD = "";
	
	private $db;
	
	public function __construct() {		
		$this->db = mysql_connect(self::DATABASE_HOST, self::DATABASE_USER, self::DATABASE_PASSWORD);
		
		if(!$this->db) {
			throw new Exception("Kon geen verbinding maken met de database.");	
		}

		mysql_select_db(self::DATABASE_NAME, $this->db);
	}
	
	public function getConnection() {
		return $this->db;
	}
}
?>